package demo.day14;
// 懒汉式单例的实现 java版本 安全 双重校验
public class _06JavaInstanceDay14 {
    private volatile static _06JavaInstanceDay14 instance;
    private _06JavaInstanceDay14(){

    }
    public static  _06JavaInstanceDay14 getInstance(){
        if (instance == null){
            synchronized (_06JavaInstanceDay14.class){
                instance = new _06JavaInstanceDay14();
            }
        }
        return instance;
    }
}
